package com.study9.provider.study9dubboprovider;

//import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
//import com.dayima.ssm.api.bean.EmailBean;
//import com.dayima.ssm.api.service.interfaces.EmailService;
//import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@EnableDubboConfiguration
//@Slf4j
public class Study9DubboProviderApplication {
//
//    @Reference
//    private static EmailService emailService;

    public static void main(String[] args) {
        SpringApplication.run(Study9DubboProviderApplication.class, args);
        System.out.println("启动成功！");
//        EmailBean emailBean = new EmailBean();
//        emailBean.setTo("xulingyun@dayima.com");
//        emailBean.setSub("测试");
//        emailBean.setText("测试");
//        log.info("[sendEmail] {}" , JSON.toJSONString(emailBean));

//        try {
//            emailService.sendEmail(emailBean);
//        } catch (Exception e){
//            log.error("发送邮件失败：" + e.getMessage(),e);
//        }
//
//        log.info("[sendEmail]....");
//        while (true) {
//            try {
//                Thread.sleep(1000);
//            } catch (InterruptedException e) {
//            }
//        }
    }

}
